<?php
/**
 * model
 */

namespace app\model;
use core\Model;
use core\Db;
class Goods extends Model{
	private $pk = 'id';
	private $table = 'ms_goods';

	// 获取数据
	public function getOne($where = [], $field = '*', $order = '', $limit = 0){
		list($sql, $params) = $this->getSql('select', $field, $where, $order, $limit, $this->table);
		$data = Db::getInstance()->row($sql, $params);
		return $data;
	}

	public function getAll($where = [], $field = '*', $order = '', $limit = 0){
		list($sql, $params) = $this->getSql('select', $field, $where, $order, $limit, $this->table);
		$data = Db::getInstance()->query($sql, $params);
		return $data;
	}


}